package demo.controller;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.alipay.sofa.runtime.api.annotation.SofaReferenceBinding;
import com.alipay.sofa.runtime.api.annotation.SofaService;
import demo.service.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/")
public class TicketController {
    @SofaReference(uniqueId = "ticket", binding = @SofaReferenceBinding(bindingType = "bolt"))
    private TicketService ticketService;

    @GetMapping("/t")
    public String getTicket(){
        return "买到了"+ticketService.getTicket();
    }
}
